"use strict";
wx.$msg = {
    success: function (msg, duration) {
        if (duration === void 0) { duration = 2000; }
        wx.showToast({
            title: msg,
            icon: 'success',
            duration: duration
        });
    },
    error: function (msg, duration) {
        if (duration === void 0) { duration = 2000; }
        wx.showToast({
            title: msg,
            icon: msg.length > 7 ? 'none' : 'error',
            duration: duration
        });
    },
    info: function (msg, duration) {
        if (duration === void 0) { duration = 2000; }
        wx.showToast({
            title: msg,
            icon: 'none',
            duration: duration
        });
    },
    loading: function (msg) {
        wx.showLoading({
            title: msg,
            mask: true
        });
    },
    closeLoading: function () {
        wx.hideLoading();
    }
};
